local skel = fk.CreateSkill{
  name = "knu__lieguan",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["knu__lieguan"] = "裂冠",
  [":knu__lieguan"] = "锁定技，所有装备区里没有武器牌的角色视为装备着【贯石斧】。",

  ["$knu__lieguan1"] = "此刀，且为人心引路。",
  ["$knu__lieguan2"] = "此戟，权证洛水之誓。",
  ["$knu__lieguan3"] = "此剑，可登九阶受禅。",
  ["$knu__lieguan4"] = "此槊，复杀乡王枭首。",
}

skel:addAcquireEffect(function (self, player, is_start)
  local room = player.room
  for _,p in ipairs(room:getAllPlayers()) do
    room:addTableMarkIfNeed(p,"klee_axe_skill","klee")
  end
end)

skel:addLoseEffect(function (self, player, is_death)
  local room = player.room
  if table.find(room:getAllPlayers(),function (p) return p:hasSkill(skel.name) end) then
    for _,p in ipairs(room:getAllPlayers()) do
      room:addTableMarkIfNeed(p,"klee_axe_skill","klee")
    end
  else
    for _,p in ipairs(room:getAllPlayers()) do
      room:removeTableMark(p,"klee_axe_skill","klee")
    end
  end
end)

skel:addEffect(fk.CardEffectCancelledOut, {--蘸金的代码
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and #target:getEquipments(Card.SubtypeWeapon) == 0 and
      #target:getAvailableEquipSlots(Card.SubtypeWeapon) > 0 and
      data.from == target and data.card.trueName == "slash" and not data.to.dead and
      Fk.skills["#axe_skill"]:isEffectable(target)
  end,
  on_use = function (self, event, target, player, data)
    Fk.skills["#axe_skill"]:doCost(event, target, target, data)
  end,
})

skel:addEffect("atkrange", {
  fixed_func = function (self, from)
    if #from:getEquipments(Card.SubtypeWeapon) == 0 and #from:getAvailableEquipSlots(Card.SubtypeWeapon) > 0 and
      table.contains(from:getTableMark("klee_axe_skill"),"klee")  then
      return 3
    end
  end,
})

return skel